// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_HR_EMPLOYEE
// * CreateDate    : 2011/12/28 11:34:29
// * Creater       : CodeSmith
// * LastChangeDate: 2011/12/28 11:34:29
// * LastChanger   : 2011/12/28 11:34:29
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class HrEmployeeEntity : EntityBase
    {
        public HrEmployeeTable TableSchema
        {
            get
            {
                return HrEmployeeTable.Current;
            }
		}
		
		public HrEmployeeEntity()
        {

        }
		
		public HrEmployeeEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.PersonId = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_ID"]));
			this.IdNo = Convert.ToString(CommonFunctions.ToObject(dr["ID_NO"]));
			this.JoinDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["JOIN_DATE"]));
			this.LeaveDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LEAVE_DATE"]));
			this.BasicSalary = Convert.ToDecimal(CommonFunctions.ToObject(dr["BASIC_SALARY"]));
			this.PoliticalLandscape = Convert.ToString(CommonFunctions.ToObject(dr["POLITICAL_LANDSCAPE"]));
			this.JoinPartyDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["JOIN_PARTY_DATE"]));
			this.Education = Convert.ToString(CommonFunctions.ToObject(dr["EDUCATION"]));
			this.Major = Convert.ToString(CommonFunctions.ToObject(dr["MAJOR"]));
			this.Minor = Convert.ToString(CommonFunctions.ToObject(dr["MINOR"]));
			this.OfficePhone = Convert.ToString(CommonFunctions.ToObject(dr["OFFICE_PHONE"]));
			this.ContractEndDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CONTRACT_END_DATE"]));
			this.ContractCode = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_CODE"]));
			this.IsMarried = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_MARRIED"]));
			this.PersonImage = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_IMAGE"]));
			this.SocialFundAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["SOCIAL_FUND_AMOUNT"]));
			this.NativeAddress = Convert.ToString(CommonFunctions.ToObject(dr["NATIVE_ADDRESS"]));
			this.Title = Convert.ToString(CommonFunctions.ToObject(dr["TITLE"]));
			this.IsSocialSecurity = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_SOCIAL_SECURITY"]));
			this.SocialSecurityNo = Convert.ToString(CommonFunctions.ToObject(dr["SOCIAL_SECURITY_NO"]));
        }
		
		public HrEmployeeEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.PersonId = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_ID"]));
			this.IdNo = Convert.ToString(CommonFunctions.ToObject(dr["ID_NO"]));
			this.JoinDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["JOIN_DATE"]));
			this.LeaveDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LEAVE_DATE"]));
			this.BasicSalary = Convert.ToDecimal(CommonFunctions.ToObject(dr["BASIC_SALARY"]));
			this.PoliticalLandscape = Convert.ToString(CommonFunctions.ToObject(dr["POLITICAL_LANDSCAPE"]));
			this.JoinPartyDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["JOIN_PARTY_DATE"]));
			this.Education = Convert.ToString(CommonFunctions.ToObject(dr["EDUCATION"]));
			this.Major = Convert.ToString(CommonFunctions.ToObject(dr["MAJOR"]));
			this.Minor = Convert.ToString(CommonFunctions.ToObject(dr["MINOR"]));
			this.OfficePhone = Convert.ToString(CommonFunctions.ToObject(dr["OFFICE_PHONE"]));
			this.ContractEndDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CONTRACT_END_DATE"]));
			this.ContractCode = Convert.ToString(CommonFunctions.ToObject(dr["CONTRACT_CODE"]));
			this.IsMarried = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_MARRIED"]));
			this.PersonImage = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_IMAGE"]));
			this.SocialFundAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["SOCIAL_FUND_AMOUNT"]));
			this.NativeAddress = Convert.ToString(CommonFunctions.ToObject(dr["NATIVE_ADDRESS"]));
			this.Title = Convert.ToString(CommonFunctions.ToObject(dr["TITLE"]));
			this.IsSocialSecurity = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_SOCIAL_SECURITY"]));
			this.SocialSecurityNo = Convert.ToString(CommonFunctions.ToObject(dr["SOCIAL_SECURITY_NO"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return HrEmployeeTable.Current;
            }
        }
		
		#region Perporty List
        public string PersonId
        {
            get { return Convert.ToString(GetData(HrEmployeeTable.C_PERSON_ID)); }
            set { SetData(HrEmployeeTable.C_PERSON_ID, value); }
        }
		
        public string IdNo
        {
            get { return Convert.ToString(GetData(HrEmployeeTable.C_ID_NO)); }
            set { SetData(HrEmployeeTable.C_ID_NO, value); }
        }
		
        public DateTime JoinDate
        {
            get { return Convert.ToDateTime(GetData(HrEmployeeTable.C_JOIN_DATE)); }
            set { SetData(HrEmployeeTable.C_JOIN_DATE, value); }
        }
		
        public DateTime LeaveDate
        {
            get { return Convert.ToDateTime(GetData(HrEmployeeTable.C_LEAVE_DATE)); }
            set { SetData(HrEmployeeTable.C_LEAVE_DATE, value); }
        }
		
        public decimal BasicSalary
        {
            get { return Convert.ToDecimal(GetData(HrEmployeeTable.C_BASIC_SALARY)); }
            set { SetData(HrEmployeeTable.C_BASIC_SALARY, value); }
        }
		
        public string PoliticalLandscape
        {
            get { return Convert.ToString(GetData(HrEmployeeTable.C_POLITICAL_LANDSCAPE)); }
            set { SetData(HrEmployeeTable.C_POLITICAL_LANDSCAPE, value); }
        }
		
        public DateTime JoinPartyDate
        {
            get { return Convert.ToDateTime(GetData(HrEmployeeTable.C_JOIN_PARTY_DATE)); }
            set { SetData(HrEmployeeTable.C_JOIN_PARTY_DATE, value); }
        }
		
        public string Education
        {
            get { return Convert.ToString(GetData(HrEmployeeTable.C_EDUCATION)); }
            set { SetData(HrEmployeeTable.C_EDUCATION, value); }
        }
		
        public string Major
        {
            get { return Convert.ToString(GetData(HrEmployeeTable.C_MAJOR)); }
            set { SetData(HrEmployeeTable.C_MAJOR, value); }
        }
		
        public string Minor
        {
            get { return Convert.ToString(GetData(HrEmployeeTable.C_MINOR)); }
            set { SetData(HrEmployeeTable.C_MINOR, value); }
        }
		
        public string OfficePhone
        {
            get { return Convert.ToString(GetData(HrEmployeeTable.C_OFFICE_PHONE)); }
            set { SetData(HrEmployeeTable.C_OFFICE_PHONE, value); }
        }
		
        public DateTime ContractEndDate
        {
            get { return Convert.ToDateTime(GetData(HrEmployeeTable.C_CONTRACT_END_DATE)); }
            set { SetData(HrEmployeeTable.C_CONTRACT_END_DATE, value); }
        }
		
        public string ContractCode
        {
            get { return Convert.ToString(GetData(HrEmployeeTable.C_CONTRACT_CODE)); }
            set { SetData(HrEmployeeTable.C_CONTRACT_CODE, value); }
        }
		
        public int IsMarried
        {
            get { return Convert.ToInt32(GetData(HrEmployeeTable.C_IS_MARRIED)); }
            set { SetData(HrEmployeeTable.C_IS_MARRIED, value); }
        }
		
        public string PersonImage
        {
            get { return Convert.ToString(GetData(HrEmployeeTable.C_PERSON_IMAGE)); }
            set { SetData(HrEmployeeTable.C_PERSON_IMAGE, value); }
        }
		
        public decimal SocialFundAmount
        {
            get { return Convert.ToDecimal(GetData(HrEmployeeTable.C_SOCIAL_FUND_AMOUNT)); }
            set { SetData(HrEmployeeTable.C_SOCIAL_FUND_AMOUNT, value); }
        }
		
        public string NativeAddress
        {
            get { return Convert.ToString(GetData(HrEmployeeTable.C_NATIVE_ADDRESS)); }
            set { SetData(HrEmployeeTable.C_NATIVE_ADDRESS, value); }
        }
		
        public string Title
        {
            get { return Convert.ToString(GetData(HrEmployeeTable.C_TITLE)); }
            set { SetData(HrEmployeeTable.C_TITLE, value); }
        }
		
        public int IsSocialSecurity
        {
            get { return Convert.ToInt32(GetData(HrEmployeeTable.C_IS_SOCIAL_SECURITY)); }
            set { SetData(HrEmployeeTable.C_IS_SOCIAL_SECURITY, value); }
        }
		
        public string SocialSecurityNo
        {
            get { return Convert.ToString(GetData(HrEmployeeTable.C_SOCIAL_SECURITY_NO)); }
            set { SetData(HrEmployeeTable.C_SOCIAL_SECURITY_NO, value); }
        }
		
		#endregion
	}
	
	
}	

